package com.suncnpap.library.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.app.util.database.mybatis.Page;
import com.suncnpap.library.service.CollectionTypeService;
import com.suncnpap.library.mapper.CollectionTypeMapper;
import com.suncnpap.library.model.CollectionType;

/** 
 * 说明： 书屋馆藏分类Service实现类
 * @version
 */
@Service("collectionTypeService")
public class CollectionTypeServiceImpl implements CollectionTypeService{

	
	@Autowired
	CollectionTypeMapper collectionTypeMapper;
	
	@Override
	public void add(CollectionType obj) {
		// TODO Auto-generated method stub
		collectionTypeMapper.add(obj);
	}

	@Override
	public void update(CollectionType obj) {
		// TODO Auto-generated method stub
		collectionTypeMapper.edit(obj);
	}

	@Override
	public void deleteById(String strId) {
		// TODO Auto-generated method stub
		collectionTypeMapper.deleteById(strId);
		
	}
	@Override
	public void deleteMore(String[] strIds) {
		// TODO Auto-generated method stub
		collectionTypeMapper.deleteMore(strIds);
	}

	@Override
	public Page list(Page page) {
		// TODO Auto-generated method stub
		List<CollectionType> list = collectionTypeMapper.datalistPage(page);
		page.setDataList(list);
		return page;
	}


	@Override
	public int findCount(Page page) {
		// TODO Auto-generated method stub
		return collectionTypeMapper.findCount(page);
	}

	@Override
	public CollectionType findById(String strId) {
		// TODO Auto-generated method stub
		return collectionTypeMapper.findById(strId);
	}
	
}

